home *** CD-ROM | disk | FTP | other *** search
- /*******************************************\
- * file: PrintFootNote.c *
- * version: 0.1ß *
- * XFCN ID 505 *
- * *
- * Sets up the foot note that will be added *
- * to the end of each page (at eject time *
- * *
- * ----------------------------------------- *
- * By: Donald Koscheka *
- * Date: 30-OCT-89 *
- * © Copyright 1989, Donald Koscheka *
- * All Rights Reserved *
- * *
- * ----------------------------------------- *
- \*******************************************/
-
-
- #include <MacTypes.h>
- #include <MemoryMgr.h>
- #include <ResourceMgr.h>
- #include <OSUtil.h>
- #include <HyperXCmd.h>
- #include <HyperUtils.h>
- #include <PrintMgr.h>
- #include "ReportUtils.h"
-
-
-
- pascal void main( paramPtr )
- XCmdBlockPtr paramPtr;
- /**********************************
- * params[0] == Client Name.
- * params[1] == Version Number.
- * params[2] == date.
- * params[3] == starting page number.
- **********************************/
- {
- Handle pH;
- Handle theText;
- footPtr myFoot;
- pInfoPtr pp;
- FontInfo fInfo;
- GrafPtr oldPort;
- styleSet footStyle;
-
- if( paramPtr->paramCount && ( pH = GetSystemResource( PAGE_INFO, PAGE_ID ) ) ){
- pp = (pInfoPtr)*pH;
- myFoot = (footPtr)&(pp->footNote);
-
- GetPort( &oldPort );
- SetPort( (GrafPtr)(pp->prPort) );
-
- PenNormal();
-
- footStyle.Font = TIMES;
- footStyle.Size = 12;
- footStyle.Style= PLAIN_TEXT;
- footStyle.Just = teJustLeft;
-
- SetFontStyles( pp, (stylePtr)&footStyle );
-
- GetFontInfo( &fInfo );
- myFoot->hite = (fInfo.ascent + fInfo.descent + fInfo.leading) * 3;
-
- /*** draw the company name and the version number ***/
- if( theText = paramPtr->params[0] ){
- HandToHand( &theText );
- myFoot->key1 = theText;
- }
-
- if( theText = paramPtr->params[1] ){
- HandToHand( &theText );
- myFoot->key2 = theText;
- }
-
- /*** draw the date and the page number ***/
- if( theText = paramPtr->params[2] ){
- HandToHand( &theText );
- myFoot->key3 = theText;
- }
-
- SetFontStyles( pp, (stylePtr)&(pp->defaultStyle) );
- SetPort( oldPort );
- }
-
- paramPtr->returnValue = NIL;
- }
-
-